<?php

namespace App\Http\Controllers\User;

use App\Http\Controllers\ApiBaseController;
use Modules\Member\Entities\User;

class ApiController extends ApiBaseController
{
    protected $auth = 'auth:user';
    protected ?User $user = null;

    public function __construct()
    {
        parent::__construct();
        $this->middleware(function ($request, $next) {
            $this->user = auth()->guard('user')->user();
            return $next($request);
        });
    }
}
